Where X=7*P+3*A.